package com.test.start;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.appmon.core.agent.CustomAgent;
import org.appmon.core.config.BehaviourProperties;
import org.appmon.core.config.PackageBaseInfo;
import com.test.bean.Address;


public class Entry {

	
	

    static {
        CustomAgent.initialize();
        
	 
    }


	
	public static void main(String[] args) {
		
		
		BehaviourProperties behaviourProperties =new BehaviourProperties();
		behaviourProperties.setMethodCountable(true);
		PackageBaseInfo.getInstance().setClassToInclude("com.test.bean.Address", behaviourProperties);
				
		
		Address s=new Address();
		
			System.out.println(s.getFname());
			System.out.println(s.getFname());
			System.out.println(s.getLname());

		
			Class noparams[] = {};
			try {
				Class cls = Class.forName("com.test.bean.Address");
				Object obj = cls.newInstance();
				
				Method method = cls.getDeclaredMethod("getAllCount", noparams);
				String returnValue = (String) method.invoke(obj, null);
				System.out.println("Return : "+returnValue);
			//	String abc=
				
			} catch (ClassNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (InstantiationException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (NoSuchMethodException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (SecurityException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (IllegalArgumentException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (InvocationTargetException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
		
	
  
		


	}

}
